<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script>
    /* 
    对象的修改，删除，检测某个属性是否在对象里
    一.修改
    二.删除
    三.in检测属性是否存在,相同的方法：hasOwnProperty();
     */
     var Student={
       name:"jason",
       age:20,
       like:function(){
         console.log("钓鱼");
       }
     }
     //修改
     Student['age']=25;
     console.log(Student);//03.对象的属性修改，删除，in.html:23 {name: "jason", age: 25, like: f}
     //删除
     delete Student['like'];
     console.log(Student);//03.对象的属性修改，删除，in.html:26 {name: "jason", age: 25}
     //in检测,相同的方法：hasOwnProperty();
     console.log("name" in Student);//true
     console.log("color" in Student);//false
     console.log(Student.hasOwnProperty("name"));//true
  </script>
</head>
<body>
  
</body>
</html>